package com.demo.commonsio;

import java.io.File;
import java.io.IOException;
import java.util.Random;

import org.apache.commons.io.FileUtils;

/**
 * mvn compile exec:java -Dexec.mainClass="com.demo.commonsio.Test"
 * @author lixl
 *
 */
public class Test {

	public static void main(String[] args) throws IOException {
		int n = Integer.MAX_VALUE;
		for (int i = 0; i < n; i++) {
			String data = i+"\t坐标:("+new Random().nextDouble()+","+new Random().nextDouble()+")"+"\t"+System.currentTimeMillis()+"|\n";
			System.out.println(i);
			FileUtils.writeStringToFile(new File("d:/locationData.txt"), data, true);
		}

	}

}
